<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--用模板引擎地址：https://blog.csdn.net/qq_24598601/article/details/89190411-->
<head>
    <meta charset="UTF-8">
    <script src="/js/jquery-1.7.2.min.js"></script>
    <script src="/"></script>
    <link rel="stylesheet" type="text/css" href="../layui/layui/css/layui.css">
    <script type="text/javascript" src="../layui/layui/layui.js"></script>
</head>
<body>
<!--<span th:text="用户名：${customer.cname}"></span>-->
<!--<form action="/test/form" method="post">
    <input name="cid" th:value="${customer.cid}">
    <input name="cname" th:value="${customer.cname}">
    <input type="submit" value="提交" />
</form>-->

<!--还有一种方法-->

<form class="layui-form" action="/test/form" method="post" th:object="${customer}">
    <input class="layui-input" name="cid" th:value="*{cid}"><br>
    <input class="layui-input" name="cname" th:value="*{cname}"><br>
    <input class="layui-btn" type="submit" value="提交"/>
    <span th:text="*{'用户名'+cname}"></span>
</form>
<a th:href="@{/test/html}">去test</a><!--相对路径，也可以访问servlert-->
</body>

</html>